Repository navigation
Show when a task finished on a Done board card - #2077
Conversation
|
@Birfy — review request for this pull request at Checks are green at that exact tip ( What the change is, in one line: a Done board card now shows when the task finished, drawn from the same card data the column already reads; P-360's rail key and the rail's counting stay as they are. |
|
Self-test: PASS at c269857 Team self-test on the named tip (read-only advisory; not the repository verdict and not a merge authorization). Ran:
Readings:
Notes (not counted against this change):
Unverified by me:
|
|
Self-test: PASS at c269857 Team advisory self-test, independent of the earlier self-test comment Ran:
Red first on
Mutation arms (red out of 20):
Scope:
One gap, not a regression:
Nothing in the body disagreed with my readings. Not verified by me:
|
|
Verdict: PASS at c269857 Ran at this tip: Red-first (hard requirement) — base
What I checked:
Label |
A card in the Done column drew the assignee and the progress bar only, so a finished task never said when it finished. It now draws a relative time beside the assignee, taken from the first terminal entry in the card's actors (accepted, cancelled or failed) and falling back to updatedAt for rows written before that history existed; no usable timestamp draws nothing. Fixes ThinkFlowLab#2066
c269857 to
c926c75
Compare
|
@Birfy — review request for this pull request at This head is the same change rebased onto the current Checks at this exact tip are green (14/14, What the change is, in one line: a Done board card now shows when the task finished, taken from the first terminal entry in the card's The earlier verdict at |
|
Self-test: PASS at c926c75 Advisory only — not a review, no Tip Ran:
Rebase resolution, checked against base text rather than the PR's own wording:
Substance is what I checked at Not verified: full |
|
Self-test: PASS at c926c75 Advisory only — not a review, no Ran (all at
Rebase resolution, read against base text:
Mutation arms on this tip, each applied alone to the source and reverted (21 tests):
Body claims checked at base Inconsistent with the body:
Not verified: real browser DOM/screenshot and clipboard; Note: another advisory sits at this same tip ( |
Fixes #2066
Written-by: Dev-1
Owner: Dev-1
Reviewer: Birfy
Claim-Id: 73966f19d3154326ad0829769e997181
Branch: dev/1-board-done-time
Base: 8540c35
Tip SHA: c926c75
What happens today
A task card in the Done column draws the assignee and the progress bar, and nothing else, so a finished task never says when it finished. The row does carry the moment:
tasks.jsrecords a terminal entry inactorson the transition that ended it, and every transition stampsupdatedAt.updatedAtis not that moment, though.record()bumps it on every transition (core/src/host/tasks.js:267-270) and again on a plain edit (:1456,by: 'updated'), so a card touched after it finished would claim the later time. A later terminal entry says nothing either: it is that same edit, written again with the same status.The change
Five places in
core/src/client/kanban.js(19 lines), plus regenerated artifacts:finishedAt(task)finds the first terminal entry intask.actors(accepted,cancelledorfailed— none of the three has a way back out,:30-39) and uses itsatwhen it is a finite number; otherwise it falls back to a finitetask.updatedAt, and otherwise returns nothing.BoardCardcomputesfinished = column === 'done' ? finishedAt(task) : undefined, so the other columns keep the footer they had.h('span', { key: 'finished', className: 'bt-board-when' }, relativeShort(finished))only when the stamp is finite and above zero:relativeShort(undefined)would printInvalid Dateand0would print 1970.KANBAN_CSSgains.bt-board-when(12 px,--bt-ink-3, no wrap).docs/subsystems/core-client.mdandchangelog.d/2066-board-done-time.added.mdsay the same in words;core/client.jsand thepatches/ds-bot/mirrors are regenerated bybuild-client/generate, never hand-edited.The time reads
just now,5 min,3 h,29 d,Sep 22through the existingrelativeShort(core/src/client/text.js:64-71) — no new i18n keys, no·separator, notitletooltip.Red first
On base
8540c35cwith onlycore/test/kanban.test.jsadded (the file at its new-main content plus the five new tests),node --test core/test/kanban.test.js: 21 tests / 18 pass / 3 fail, three runs identical. The three failures are the three that need a node the footer does not draw yet:a Done card says when it finished, from the first terminal actor entry→assert.equal(whenOf(board.column('done'), 'task-done111111'), '2 h')→undefined !== '2 h'a Done card with no actor entry falls back to updatedAt→assert.equal(whenOf(board.column('done'), 'task-done333333'), '3 h')→undefined !== '3 h'a room board Done card says when it finished too→assert.equal(whenOf(board.column('done'), 'task-done666666'), '2 h')→undefined !== '2 h'With the change, on the same base: 21 tests / 21 pass / 0 fail, three runs identical.
Mutations, each applied alone to the changed source and then reverted to green:
expected '2 h',actual '1 min')updatedAtinstead of the terminal entry → 21 / 19 / 2 (A and E red)column === 'done'/ finite guard → 21 / 19 / 2 (B and D red:bt-board-whenappears on an In progress card)Verified
TZ=UTC ARCH_DOCS_BASE=8540c35c npm run verify→ exit 0: core 2554/2554, social 541, tree 127, timeline 135, workflow 336,.github/scripts572, interop 37, live-e2e 24; core lint 73 warnings / 0 errors (the other five packages: 36 / 9 / 2 / 16 warnings, 0 errors);arch-docs: OK (8 changed file(s)). That run includesbuild-client.mjs --checkandds-bot-patches check/canonical.Separately, after the rebase:
cd core && node scripts/build-client.mjsthen--check→ exit 0 on both;node scripts/ds-bot-patches.mjs generatethencheck→ok 10 patches apply cleanly in order,ok core/ equals ds-bot/ + patches/ds-bot/, andgit statusstayed empty, so the regenerated bundle and mirrors are what the tree already holds.Which tree the checks ran on
The branch is rebased onto
8540c35c95e1a1125ad00c2ebc46655bd730a64a(one commit, single parent); the file conflicts werecore/test/kanban.test.js,docs/subsystems/core-client.mdand the patched test mirror, resolved by keeping main's new lines plus this change's five tests and one doc sentence.Verify and
arch-docsran on a local checkout whose tree isdac5ebe7c5cc269f4e42b6a40f72f3909dc11d84, identical to this tip's tree. The pushed headc926c75339fb56c41011cbc0e1aa3e0d710aa776was rebuilt from that same tree by the push path, so its sha differs while its tree does not;checks.atnames this tip, which is what CI ran on.Not run
The smoke test (nothing under
core/index.jsorcore/src/host/changed) and the packaged Desktop install path.Checkpoint
{ "pr": 2077, "claim": "Dev-1", "issue": 2066, "summary": "A Done card drew the assignee and the progress bar only, so a finished task never said when it finished. The card now draws a relative time beside the assignee, taken from the first terminal entry in the card's actors (accepted, cancelled or failed) rather than updatedAt, which an edit also bumps. A row written before that history existed falls back to updatedAt, and a card with no usable stamp draws no node, so relativeShort never prints Invalid Date or 1970. Five tests cover the stamp, the other columns, the fallback and a room board, and three of them fail without the change.", "files": [ "changelog.d/2066-board-done-time.added.md", "core/client.js", "core/src/client/kanban.js", "core/test/kanban.test.js", "docs/subsystems/core-client.md", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/files/src/client/kanban.js", "patches/ds-bot/files/test/kanban.test.js" ], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=8540c35c npm run verify; build-client --check; ds-bot-patches generate + check", "result": "green", "at": "c926c75339fb56c41011cbc0e1aa3e0d710aa776" }, "next": "none — ready for review" }